import type {
  ZiChanIndexRequest,
  ZiChanIndexData,
  GetAccountRequest,
  GetAccountResponse,
  UpdateAccountRequest,
  GetAccountAmountRequest,
  GetAccountAmountResponse,
} from '@/types/zichan'
import { http } from '@/utils/http'
/**
 * 获取数据
 * @param data 请求参数
 */
export const ZiChanIndexAPI = (data: ZiChanIndexRequest) => {
  return http<ZiChanIndexData>({
    method: 'POST',
    url: '/ZiChan/ZiChanIndex',
    data,
  })
}
/**
 * 获取账号信息
 * @param data 请求参数
 */
export const GetAccountAPI = (data: GetAccountRequest) => {
  return http<GetAccountResponse>({
    method: 'POST',
    url: '/ZiChan/GetAccount',
    data,
  })
}
export const GetAccountAmountAPI = (data: GetAccountAmountRequest) => {
  return http<GetAccountAmountResponse>({
    method: 'POST',
    url: '/Account/GetAccountAmount',
    data,
  })
}
/**
 * 获取账号信息
 * @param data 请求参数
 */
export const UpdateUserAccountAPI = (data: GetAccountRequest) => {
  return http<GetAccountResponse>({
    method: 'POST',
    url: '/ZiChan/GetAccount',
    data,
  })
}
/**
 * 修改账户金额
 * @param data 请求参数
 */
export const UpdateAccountAPI = (data: UpdateAccountRequest) => {
  return http<{}>({
    method: 'POST',
    url: '/ZiChan/UpdateAccount',
    data,
  })
}
